<?php

namespace App\Models\customer;

use App\Models\AdminModel;
use App\Models\CustomerModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model as BaseModel;


class TrajectoryModel extends BaseModel
{
    use HasFactory, SoftDeletes;

    protected $table = 't_sop_trajectory';

    protected $primaryKey = 'id';

    public $timestamps = true;

    const CREATED_AT = 'created_at';
    
    const UPDATED_AT = null;

    const PLATFORM = [1 => '天猫', 2 => 'LAZADA'];

    const STATUS = [0 => '禁用', 1 => '启用'];

    protected $guarded = [];

    protected $hidden = [
        'deleted_at',
    ];

    //客户
    public function customer(): BelongsTo {
        return $this->belongsTo(CustomerModel::class, 'customer_id');
    }



}
